POST
/
toptimize
/
v1
/
retrieval
curl --request POST \
  --url https://api.topsort.com/toptimize/v1/retrieval \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "slots": 5,
  "opaqueUserId": "u_9ske45",
  "seedProductIds": [
    "p_PJbnN",
    "p_ojng4"
  ],
  "mode": "all",
  "deviceType": "mobile"
}'
{
  "objectType": "listing",
  "objects": [
    {
      "id": "p_xh90s",
      "value": 0.978
    },
    {
      "id": "p_12lp0",
      "value": 0.953
    },
    {
      "id": "p_ds7ui",
      "value": 0.877
    }
  ],
  "error": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The context information for the predictions, including which metrics to predict.

The body is of type object.

Response

200
application/json

The retrieval results. Each retrieved products is accompanied by their relevancy score.

The response is of type object.